<template>
    <div class="home" @click="btnFun()">
        {{ userStore.name }}--{{ userStore.age }}--
        <el-switch v-model="value1" />
        <el-switch v-model="value2" class="ml-2"
            style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949" />
    </div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { useUserStore } from '@/store/user';
const userStore = useUserStore();

const value1 = ref(true)
const value2 = ref(true)


function init() {
    console.log('\ud83e\udd16', '\ud83d\udeac');
}
init();
const btnFun = () => {
    userStore.updateName('李四');
};
</script>
<style lang="scss">
.home {
    cursor: pointer;
}
</style>
